var that,
  api = new (require('../../utils/api.js')),
  headimg = api.getimgurl(), 
  app = getApp(),
  util = new (require('../../utils/util.js'));
Page({

  /**
   * 页面的初始数据
   */
  data: {
    stamp:0,
    total:'23,044.5',
    ljsy:'+234.31',
    yue_top:'9.89',
    yuesy:33,
    licai_top:'9.89',
    licaisy:'0.00',
    bx_top:'9.89',
    bxsy:'0.00',
    zrsy:'+223.00',
    num:1,
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    that = this;
    let {settings} =  app.logininfo,{totalassets,balance,balancerevenue,lc,lcerevenue,insurance,insuranceerevenue,profit,erevenue} = settings;
    that.setData({totalassets,balance,balancerevenue,lc,lcerevenue,insurance,insuranceerevenue,profit,erevenue})
  },
  to(){
    wx.navigateTo({
      url: '../trd/trd',
    })
  },

  click(e){
    let{stamp ,num} = this.data,curtime = e.timeStamp
    if(curtime-stamp<500){
      that.setData({num:num+1})
    }else{
      that.setData({num:1})
    }
    if(this.data.num==2){
     wx.navigateTo({
       url: '../benefit/benefit',
     })
    }
    that.setData({stamp:curtime})
    console.log(curtime,'curtime');

  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {
  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  }
})